Non-volatile memory systems, such as flash memory, have been widely adopted for use in host devices, such as consumer products. Flash memory may be found in different forms, such as in the form of a portable memory card that can be carried between host devices or as a solid state disk (SSD) embedded in a host device.
An example of a memory system 102 in combination with a host system 100 is shown in FIG. 1. Host system 100 includes one or more host applications 110 and a host operating system 108. The host operating system 108 includes device drivers 114. The memory system 102 includes a system controller 118 and a memory 116. The memory system 102 may be in the form of a card that is removably connected to the host system 100 through mating parts 104 and 106 of a mechanical and electrical connector as illustrated in FIG. 1.
The host applications 110 execute on top of the host operating system 108, including making system calls using an applications programming interface (API) 112 to the host operating system. More specifically, the API 112 is an interface implemented by the host applications 110 (or other software program) that enables the host applications 110 to interact with other software, such as the memory system 102.
In system calls involving accessing the memory system 102, the host operating system 108 has a set of commands it can perform with respect to the memory system 102, and uses the device drivers 114 to configure a command from the set of commands. In particular, the device drivers 114 format the command for the particular type of memory system 102 (e.g., flash memory, RAM, static RAM, etc.) and the particular action (such as read, write, etc.).
For example, the host operating system 108 sends a command to read memory locations at particular Logical Block Addresses (LBAs). The logical block is a virtual unit of address space defined to have the same size as a physical block. A logical block is typically 512 Bytes of host data identified by a logical block address (LBA) within a logical partition. Each logical block includes a range of logical block addresses (LBAs) that are associated with data received from the host device. The LBAs are then mapped to one or more physical blocks in the flash memory where the data is physically stored. The system controller 118 may convert between the LBAs in the command and physical addresses of the memory 116.
Adding new functionality to the host operating system may include expanding the set of commands in the host operating system. For example, adding data encryption to the set of commands in the host operating system may include an upgrade, such as by modifying existing device drivers or adding new drivers. There are times, however, when it is not feasible or possible to upgrade the host operating system.
As discussed above, the host operating system has access to the LBAs, which are used to formulate the commands to the memory card 102. However, other parts of the host device, such as the host applications 110, are usually not exposed to the LBAs. In order to implement the new functionality using the host application, previous solutions provided the LBAs to the host application.
One solution is for the host application to copy the host file system from the storage device, and using the copied host file system, provide the LBA of the file. However, this solution causes multiple copies of the file system, with the traditional host file system being managed by the host operating system and the duplicate host file system being managed by the host application. A second solution is for the host application to query the host operating system for the LBA of the file. However this solution may not be available since the host operating system may not support queries for the LBA.
Accordingly, both solutions to provide the LBA to the host application using the file system suffer from drawbacks.